templates = [
    'TemplateOSLinux',
    'TemplateAppZabbixServer',
    'TemplateAppZabbixProxy',
    'TemplateAppZabbixAgent',
    'TemplateSNMPInterfaces',
    'TemplateSNMPGeneric',
    'TemplateSNMPDevice',
    'TemplateSNMPOSWindows',
    'TemplateSNMPDisks',
    'TemplateSNMPOSLinux',
    'TemplateSNMPProcessors',
    'TemplateIPMIIntelSR1530',
    'TemplateIPMIIntelSR1630',
    'TemplateAppMySQL',
    'TemplateOSOpenBSD',
    'TemplateOSFreeBSD',
    'TemplateOSAIX',
    'TemplateOSHP-UX',
    'TemplateOSSolaris',
    'TemplateOSMacOSX',
    'TemplateOSWindows',
    'TemplateJMXGeneric',
    'TemplateJMXTomcat',
    'TemplateVirtVMware',
    'TemplateVirtVMwareGuest',
    'TemplateVirtVMwareHypervisor',
    'TemplateAppFTPService',
    'TemplateAppHTTPService',
    'TemplateAppHTTPSService',
    'TemplateAppIMAPService',
    'TemplateAppLDAPService',
    'TemplateAppNNTPService',
    'TemplateAppNTPService',
    'TemplateAppPOPService',
    'TemplateAppSMTPService',
    'TemplateAppSSHService',
    'TemplateAppTelnetService',
    'TemplateICMPPing',
    'TemplateNetworkSNMPInterfaces',
    'ICMPPingService',
    'IO-FileServer-ucloud-monitor',
    'IO-FileServer-monitor',
    'TCP-monitor',
    'TPL-COMM-CPU-4',
    'TPL-COMM-CPU-12',
    'TPL-COMM-CPU-16',
    'TPL-COMM-CPU-24',
    'TPL-COMM-CPU-32',
    'TPL-SYS-COMM-BASIC',
    'TPL-SYS-COMM-BASIC-CACHE',
    'TPL-SYS-COMM-BASIC-DB',
    'TPL-SYS-COMM-BASIC-JAVA',
    'TPL-SYS-COMM-BASIC-UC-PHP',
    'TPL-SYS-COMM-BASIC-LIVE800',
    'TPL-SYS-COMM-BASIC-LVS',
    'TPL-SYS-COMM-BASIC-NGINX',
    'TPL-SYS-COMM-BASIC-PHP',
    'TPL-SYS-COMM-BASIC-PROXY',
    'TPL-SYS-COMM-BASIC-PUSH',
    'TPL-SYS-COMM-BASIC-SOLR',
    'TemplateRedisAutoDiscovery',
    'Template_FromDual.MySQL.innodb',
    'Template_FromDual.MySQL.master',
    'Template_FromDual.MySQL.mpm',
    'Template_FromDual.MySQL.mysql',
    'Template_FromDual.MySQL.server',
    'Template_FromDual.MySQL.slave',
    'named-monitor',
    'Nginx-monitor',
    'NGINX_LOG_STATUS_CODE',
    'PHP-FPM-monitor',
    'PHP_SLOW_NUM',
    'PUSH-rabbitmq',
    'Dubbo-monitor',
    'Elk_client-monitor',
    'Elk_server-elasticsearch-monitor',
    'Elk_server-logstash-monitor',
    'Erp-flume-monitor',
    'Esper-service',
    'java001-monitor',
    'Juanpi-proxy-monitor',
    'logstash-monitor',
    'Rabbitmq-monitor',
    'TemplateMemcacheAutoDiscovery',
    'push-3579',
    'push-8080',
    'xuanyuan-bpm-monitor',
    'xuanyuan-cart-domain-monitor',
    'xuanyuan-cart-processor-monitor',
    'xuanyuan-cart-service-monitor',
    'xuanyuan-db-executor-monitor',
    'xuanyuan-es-monitor',
    'xuanyuan-goods-domain-monitor',
    'xuanyuan-goods-domainloader-monitor',
    'xuanyuan-goods-processor-monitor',
    'xuanyuan-goods-service-monitor',
    'xuanyuan-goods-task-monitor',
    'xuanyuan-goods-tool-monitor',
    'xuanyuan-goods-web-tools-monitor',
    'xuanyuan-juanpi-flume-monitor',
    'xuanyuan-juanpi-monitor',
    'xuanyuan-juanpi-proxy-monitor',
    'xuanyuan-member-service-monitor',
    'xuanyuan-mkt-brandcouponservice-monitor',
    'xuanyuan-mkt-domain-monitor',
    'xuanyuan-mkt-domainloader-monitor',
    'xuanyuan-mkt-jobs-monitor',
    'xuanyuan-mkt-mgn-servic-monitor',
    'xuanyuan-mkt-processor-monitor',
    'xuanyuan-mkt-service-monitor',
    'xuanyuan-order-domain-monitor',
    'xuanyuan-order-job-monitor',
    'xuanyuan-order-processor-monitor',
    'xuanyuan-order-service-monitor',
    'Zookeeper-monitor',
    'TPL-SYS-COMM-BASIC-DNS',
    'TPL-SYS-COMM-BASIC-Admin-systems',
    'TPL-SYS-COMM-BASIC-Zookeeper',
    'TPL-SYS-COMM-BASIC-MQ',
    'TPL-SYS-COMM-BASIC-Kafka',
    'TPL-SYS-COMM-BASIC-Live800',
    'TPL-SYS-COMM-BASIC-MongoDB',
    'TPL-SYS-COMM-BASIC-Monitor-Storage',
    'TPL-SYS-COMM-BASIC-Zeus-Shell',
    'TPL-SYS-COMM-BASIC-MemCache',
    'TPL-SYS-COMM-BASIC-BI',
    'IO-FileServer-Kvm-Push',
    'IO-FileServer-Kvm-Redis',
    'IO-FileServer-Kvm-Live800',
    'TPL-SYS-COMM-BASIC-Kvm-Push',
    'TPL-SYS-COMM-BASIC-Kvm-Redis',
    'TPL-SYS-COMM-BASIC-Kvm-Live800',
    'TPL-SYS-COMM-BASIC-IM',
    'IO-FileServer-ucloud-IM',
    'TPL-COMM-CPU-12-IM',
    'xuanyuan-grade-dbexecutor',
    'xuanyuan-member-dbexecutor',
    'xuanyuan-member-domainprocess',
    'xuanyuan-member-processorprocess',
    'Bi_Push_Live800Lvs',
    'PhpLvs',
    'TW_Dns_McLvs',
    'Java_ProxyLvs',
    'quagga-monitor',
    'push-8082',
    'push-8083',
    'push-zookeeper',
    'push-redis6379',
    'im-80',
    'im',
    'im-node',
    'im-storage',
    'TemplateNetworkSUM',
    'Live800Port8080',
    'BIPerconaMySQL',
    'xuanyuan-cart-job-monitor',
    'BI-diskstats-dis',
    'BI-process-dis',
    'BI-tcp-status',
    'TemplateHAProxyStatus',
    'geotest',
    'Push-Zookeeper-monitor',
    'Cisco3850',
    'Cisco9504',
    'xuanyuan-favorites-dbexecutor',
    'xuanyuan-favorites-command',
    'xuanyuan-member-job',
    'xuanyuan-favorites-service',
    'H3C6800',
    'BI-COMM-CPU-32',
    'BI-COMM-CPU-24',
    'BiserviceLvs',
    'IO-FileServer-Kvm-Biservice-Lvs',
    'TPL-SYS-COMM-BASIC-Biservice-Lvs',
    'CobarLvs',
    'GZ_JSQ_JP_Cobra',
    'TPL-SYS-COMM-BASIC-COBRA',
    'xuanyuan-order-serviceOmnipotent',
    'ORDER_SERVICE_FGC',
    'GZ_JSQ_JP_MONGODB_MASTER',
    'MKT_SERVICE_FGC',
    'CART_SERVICE_FGC',
    'GOODS_SERVICE_FGC',
    'MEMBER_SERVICE_FGC',
    'FAVORITES_SERVICE_FGC'
]

key_dict = {
    "vm.memory.size": "mem.memtotal",
    "proc.num": "proc.num",
    "kernel.maxfiles": "kernel.maxfiles",
    "kernel.maxproc": "kernel.maxprox",
    "system.swap.size": "mem.swaptotal",
    "system.cpu.load": "cpu.busy",
    "system.cpu.util": "cpu"
}

func_dict = { 
    "last": "all",
    "min": "min",
    "max": "max",
    "diff": "diff",
    "avg": "avg"
}
'''
{
    u'triggerid': u'14079',
    u'functions': [
        {
            u'itemid': u'27085',
            u'function': u'max',
            u'triggerid': u'14079',
            u'parameter': u'#3',
            u'functionid': u'13684'
        }
    ],
    u'expression': u'{
        13684
    }=0',
    u'description': u'ICMPpingisunavailable',
    u'templateid': u'0'
}

[
    {
        u'itemid': u'27085',
        u'hostid': u'10112',
        u'key_': u'icmpping'
    }
]
'''